# -*- coding: utf-8 -*-
#iscan 生成单号
class GenerationNo():
    #生成单号
    def __init__(self,driver):
        self.driver = driver
    #新单业务
    def newCase(self):
        return self.driver.find_element_by_class_name("icon-img")
    #新客户按钮
    def newCustomer(self):
        return self.driver.find_element_by_css_selector(".btn.btn-submit.btn-newcustomer")
    #姓名
    def name(self):
        return self.driver.find_element_by_class_name("modalcontent").find_elements_by_css_selector(".ipt-text.check-vali")[0]
    #身份证
    def cardId(self):
        return self.driver.find_element_by_class_name("modalcontent").find_elements_by_css_selector(".ipt-text.check-vali")[1]
    #出生日期
    def birth(self):
        return self.driver.find_element_by_class_name("modalcontent").find_element_by_class_name("am-list-extra")
    def confirm(self):
        return self.driver.find_element_by_css_selector(".am-picker-popup-item.am-picker-popup-header-right")
    #性别男
    def sexM(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[2]/div[5]/div/div[2]/ul/li[4]/div/label[1]")
    #性别女
    def sexF(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[2]/div[5]/div/div[2]/ul/li[4]/div/label[2]")
    #确定按钮
    def submit(self):
        return self.driver.find_element_by_class_name("modalfooter").find_element_by_css_selector(".btn.btn-submit")
    #渠道
    def channel(self):
        return self.driver.find_elements_by_css_selector(".mar-right-40")[0]
    #单号
    def number(self):
        return self.driver.find_element_by_css_selector("[style='line-height: 38px;']")
    #新单收件下一步
    def next(self):
        return self.driver.find_element_by_css_selector(".btn.btn-submit.btn-save")
    #资料大类-客户基本信息资料
    def customerInformation01(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[1]/ul/li[1]")
    def customerInformation02(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[1]/ul/li[2]")
    def customerInformation03(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[1]/ul/li[3]")
    def customerInformation04(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[1]/ul/li[4]")
    #资料类型
    def informationType01(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[2]/ul/li[1]")
    def informationType02(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[2]/ul/li[2]")
    def informationType03(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[2]/ul/li[3]")
    def informationType04(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[2]/ul/li[4]")
    def informationType05(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[2]/ul/li[5]")
    #箱号
    def Box(self):
        return self.driver.find_element_by_xpath("//*[@id='root']/div/div[3]/div/div[3]/div/input")
    #上传资料
    def upload(self):
        return self.driver.find_element_by_class_name("icon-upload")
    #提交
    def submitInfomation(self):
        return self.driver.find_element_by_css_selector(".btn.btn-submit.btn-save")
    #icon menu
    def iconMenu(self):
        return self.driver.find_element_by_class_name("icon-menu")
    #首页
    def homePage(self):
        return self.driver.find_element_by_class_name("icon-note")
    #照会
    def iconCamera(self):
        return self.driver.find_element_by_class_name("icon-camera")